package com.ysd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ysd.entity.Cart;
import com.ysd.mapper.CartMapper;
import com.ysd.service.CartService;

@Service
public class CartServiceImpl implements CartService {

	@Autowired
	private CartMapper cartMapper;

	@Override
	public List<Cart> getAll(int uid) {
		return cartMapper.getAll(uid);
	}

	@Override
	public int updateCart(int id, int num) {
		return cartMapper.updateCart(id, num);
	}

	@Override
	public int deleteCart(int id) {
		return cartMapper.deleteCart(id);
	}

	@Override
	public int deleteCarts(int uid) {
		return cartMapper.deleteCarts(uid);
	}
}